/**
 * 
 */
package com.ccqlk.attendance.common.page;

/**
 * Copyright 2015-2018 重庆鲁控科技有限公司<br>
 * 文件标题: Sort<br>
 * 文件说明: 排序信息<br>
 * @author ZhangYinxian 348893009@qq.com<br>
 * 创建时间 2016年5月27日 上午9:27:38<br>
 */
public class Sort {

	private String column;
	private Direction direction;

	public Sort(){}
	
	public Sort(Direction direction, String column){
		this.column = column;
		this.direction = direction;
	}
	
	public Sort(String column, String directionName){
		this(Direction.parse(directionName), column );
	}
	
	public String getColumn() {
		return column;
	}

	public void setColumn(String column) {
		this.column = column;
	}

	public Direction getDirection() {
		if (direction==null) {
			direction = Direction.ASC;
		}
		return direction;
	}

	public void setDirection(Direction direction) {
		this.direction = direction;
	}
}
